<?php

/**
 * @author Rizky Tahara Shita
 * @website http://tahara.web.id
 * @email rizky.tahara@gmail.com
 * @copyright b'IT Cyber Solution
 */

class M_autocomplete extends BZ_Model
{
/**
 * @section Autocomplete Functions
 */

	/**
	 * @function popup_list
	 * @description populate the data for the autocomplete popup list
	 */
	function popup_list($prm_data = array(), $prm_autocomplete_format = array())
	{
		$return_value = '';

		if (is_array($prm_data))
		{
			foreach ($prm_data as $rows)
			{
				$autocomplete_format = '';
				$i = 0;
				foreach ($prm_autocomplete_format as $autocomplete_value)
				{
					if ($i != 0) $autocomplete_format .= '|';
					$autocomplete_format .= $rows[$autocomplete_value];
					$i++;
				}
				$return_value .= $autocomplete_format."\n";
			}
		}


		return $return_value;
	}



}

/** End of file m_autocomplete.php */
/** Location: ./biskitz_mpc/biskitz/models/m_autocomplete.php */